package com.java.system.tool;

import java.text.MessageFormat;
import java.util.List;

public class printTools {

    public static void printAll(String head,List<String> keys,List<String> values){

        print("======================="+head+"===================");
        print("                                                   ");
        printText(keys,values);
        print("                                                    ");
    }

    public static void printText(List<String> keys,List<String> values){
        for (int i = 0; i < keys.size(); i++) {
            print(buildText(keys.get(i),values.get(i)));
        }
    }

    private static String buildText(String key,String value){
       return format(key+" : {0}",value);
    }

    private static void print(String log){
        System.out.println(log);
    }

    private static String format(String template,String ...params){
        return MessageFormat.format(template,params);
    }

}
